package com.dk.common.distribute.election;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@RequiredArgsConstructor
public class StandaloneLeaderElection implements DistLeaderElection {
    private final String name;

    @Override
    public boolean isLeader() {
        return true;
    }

    @Override
    public void addListener(ElectionListener electionListener) {
        electionListener.gotLeader();
    }

    @Override
    public void removeListener(ElectionListener electionListener) {
        //IGNORE
    }

}
